from sympy.geometry.point import Point3D
from sympy.geometry.entity import GeometryEntity, GeometrySet
from sympy.core.containers import Tuple


class Polyhedron(GeometrySet):
    def __new__(cls, *args, **kwargs):
        if len(args) == len(
            list(filter(lambda point: isinstance(point, Point3D), args))
        ):
            return GeometryEntity.__new__(cls, *args, **kwargs)
        else:
            raise ValueError("The inputs should all be Point3D.")

    @property
    def vertices(self):
        return Tuple(*self.args)
